
package com.market.service;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;

import com.market.bean.Subproduct;

public class SubproductServiceImpl extends BaseServiceImpl implements ISubproductService
{
    /*
     * (non-Javadoc)
     * 
     * @see com.market.service.ISubproductService#findById(long)
     */
    /*
     * public Subproduct findById(long id) { return getSubproductDAO().findById(id); }
     */
    public List findByCustomer(long id)
    {
        DetachedCriteria detachCri = DetachedCriteria.forClass(Subproduct.class);
        detachCri.add(Restrictions.eq("cusid", new Long(id)));
        return getSubproductDAO().findByDetchedCriteria(detachCri, 0, 0);
    }
    /*
     * public void remove(long cusid, long productid) { // TODO Auto-generated method stub
     * DetachedCriteria detachCri = DetachedCriteria.forClass(Subproduct.class);
     * detachCri.add(Restrictions.eq("cusid",cusid));
     * detachCri.add(Restrictions.eq("productid",productid)); deleteByDetachedCriteria(detachCri); }
     */
}
